<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_content
 * @copyright	Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

// no direct access
defined('_JEXEC') or die;

JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');

// Create shortcuts to some parameters.
$params		= $this->item->params;
$images = json_decode($this->item->images);
$metadata = json_decode($this->item->metadata);
$urls = json_decode($this->item->urls);
$canEdit	= $this->item->params->get('access-edit');
$user		= JFactory::getUser();

?>




<div class="w960 car_detail">
				<div class="detail-car">
					<div class="photo-car">
						<img alt="" src="<?php echo htmlspecialchars($metadata->carimage1); ?>">
						<br>
						<p><a class="view-gallery-but" href="#">VIEW GALLERY</a></p>
					</div>
					<div class="info-car">
						<div class="info1">
							<h3><?php echo $this->escape($this->item->title); ?></h3>
							<p><span>Stock Number</span>		: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->stock_number ?></p>
							<p><span>Price</span>				: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->price ?></p>
							<p><span>Make	</span>				: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->make ?></p>
							<p><span>Model</span>				: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->model ?></p>
							<p><span>Year of Manufacture</span>	: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->year ?></p>
							<p><span>Registration Date</span>		: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->registration_date ?></p>
							<p><span>Color</span>				: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->color ?> </p>
							<p><span>Engine Capacity</span>		: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->engine_capacity ?></p>
							<p><span>Transmission	</span>		: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->transmission ?></p>
							<p><span>Mileage (KMs)</span>		: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->mileage ?></p>
							<p><span>Status	</span>				: 	&nbsp;&nbsp;&nbsp;<?php echo $metadata->status ?></p>
						</div>
						<div class="info2">
							<h3>Description</h3>
							<?php echo $this->item->introtext; ?>
							<br>
							<h3>Accessories:</h3>
							<?php echo str_replace("\r\n","<br />",$metadata->accessories) ?>
			 <br />
							<a href="contact-us">ENQUIRY NOW</a>
						</div>
					</div>
				</div>
			</div>
<div class="gallery_out hidden">
<div class="gallery">
				<div class="w960">
					
						
					<ul class="bxslider">
						 <?php for($ii=1; $ii < 11; $ii++) { ?>
						    <?php
						      $image = "carimage".$ii;
						      $image_title = "carimage".$ii."_title";
						      $image_intro = "carimage".$ii."_intro";
						    ?>
						    
						    <?php if($metadata->$image != '') { ?>
						      <li><img rel="idd<?php echo $ii ?>" src="<?php echo htmlspecialchars($metadata->$image); ?>" alt="">
							<div class="text-banner">
								<h3><?php echo $metadata->$image_title ?></h3>
								<p><?php echo $metadata->$image_intro ?></p>
							</div>
						</li>
						    <?php } ?>
						 
						 <?php } ?>
						 
						 
						 
						
					</ul>
				</div>
			</div>
</div>

<div class="zoom" style="display: none">
 <div class="zoom-content">
					    <?php for($ii=1; $ii < 11; $ii++) { ?>
						    <?php
						      $image = "carimage".$ii;
						      $image_title = "carimage".$ii."_title";
						      $image_intro = "carimage".$ii."_intro";
						    ?>
						    
						    <?php if($metadata->$image != '') { ?>
						      <img rel="idd<?php echo $ii ?>" src="<?php echo htmlspecialchars($metadata->$image); ?>" alt="">

						    <?php } ?>
						 
						 <?php } ?>
			<div class="controls">
			 <a class="close" href="#">X</a>
			 <a class="next" href="#">></a>
			 <a class="prev" href="#"><</a>
			</div>
 </div>
</div>

<?php echo $this->item->event->afterDisplayContent; ?>

